package listerprogregistre;

import java.util.Enumeration;
import com.ice.jni.registry.Registry;
import com.ice.jni.registry.RegistryException;
import com.ice.jni.registry.RegistryKey;

public class ListerProgRegistre
{
    public static void main(String[] args)
    {
        Enumeration e = null;
        
        //RegistryKey key = Registry.openSubkey(Registry.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Office\\11.0\\Excel\\InstallRoot", RegistryKey.ACCESS_READ);
        //RegistryKey key2 = new RegistryKey(1, null);
        try
        {
            RegistryKey cle = Registry.HKEY_LOCAL_MACHINE.connectRegistry("philippe");
            RegistryKey key = Registry.openSubkey(cle, "SOFTWARE\\Microsoft\\Office\\12.0\\Excel\\InstallRoot", RegistryKey.ACCESS_READ);
            e = key.valueElements();
        }
        catch (Exception e1)
        {
            e1.printStackTrace();
        }
        while (e.hasMoreElements())
        {
          System.out.println("clé : " + e.nextElement());
        }
    }   
}
